<template>
  <div name="DataCenterlist" class="s-DataCenterlist">
    <div class="title-content">
      <div class="title">
        <span>
          {{ title }}
        </span>
        <b v-upperText="textOne"></b>
      </div>
      <div class="more" v-if="moreUrl">
        <span>更多</span>
        <i class="el-icon-arrow-right"></i>
      </div>
    </div>
    <div class="list-content">
      <template v-if="data && data.length > 0">
        <div class="item-content" v-for="d in data" :key="d.id">
          <i></i>
          <div class="itemtitle">
            <p class="ell">{{ d.name }}</p>
            <div class="rightText">
              <span v-if="title == '最新资源'">{{ d.releasetime }}</span>
              <span class="visit" v-if="title == '热门资源'">{{ d.applysum }}次访问</span>
            </div>
          </div>
          <div class="work">{{ d.deptname }}</div>
        </div>
      </template>
      <el-empty v-else></el-empty>
    </div>
  </div>
</template>
<script>
export default {
  name: "DataCenterlist",
  props: {
    title: {
      type: String,
      default: "标题",
    },
    moreUrl: {
      type: String,
      default: "",
    },
    data: {
      type: Array,
      default: () => {
        return [];
      },
    },
  },
  data() {
    return {
      textOne: "Hello",
    };
  },
};
</script>
